<?php
/**
 * Klasse zur Ausgabe von Label
 *
 * @author		Joachim Ruf, Loresoft Software (http://www.loresoft.de)
 * @license		New BSD License
 * @version		Class for Bootstrap v2.3.2
 *
 * */


Class Bootstrap_Label_Handler
{


	/**
	 *
	 * */
	function __construct () {

	}


	private function getParameter ($_class, array $_arrParam) {
		$result	= NULL;

		if (isset($_arrParam['class'])) { // Class-Parameter verbinden
			$_arrParam['class']	= $_arrParam['class'].' '.$_class;
		} else {
			$_arrParam['class']	= $_class;
		}

		foreach ($_arrParam as $key => $val) {
			$result	.= ' '.$key.'="'.$val.'"';
		}

		return $result;
	}


	/**
	 * Gibt ein Default-Element aus
	 * @param string $_content
	 * @return string
	 * */
	public function getDefault ($_content, array $_arrParam = array()) {
		return '<span'.$this->getParameter('label', $_arrParam).'>'.$_content.'</span>';
	}


	/**
	 * Gibt ein Success-Element aus
	 * @param string $_content
	 * @return string
	 * */
	public function getSuccess ($_content, array $_arrParam = array()) {
		return '<span'.$this->getParameter('label label-success', $_arrParam).'>'.$_content.'</span>';
	}


	/**
	 * Gibt ein Warning-Element aus
	 * @param string $_content
	 * @return string
	 * */
	public function getWarning ($_content, array $_arrParam = array()) {
		return '<span'.$this->getParameter('label label-warning', $_arrParam).'>'.$_content.'</span>';
	}


	/**
	 * Gibt ein Important-Element aus
	 * @param string $_content
	 * @return string
	 * */
	public function getImportant ($_content, array $_arrParam = array()) {
		return '<span'.$this->getParameter('label label-important', $_arrParam).'>'.$_content.'</span>';
	}


	/**
	 * Gibt ein Info-Element aus
	 * @param string $_content
	 * @return string
	 * */
	public function getInfo ($_content, array $_arrParam = array()) {
		return '<span'.$this->getParameter('label label-info', $_arrParam).'>'.$_content.'</span>';
	}


	/**
	 * Gibt ein Inverse-Element aus
	 * @param string $_content
	 * @return string
	 * */
	public function getInverse ($_content, array $_arrParam = array()) {
		return '<span'.$this->getParameter('label label-inverse', $_arrParam).'>'.$_content.'</span>';
	}


}


?>